/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cube;

import javafx.stage.Screen.*;
import javafx.scene.paint.Color;

/**
 * @author charmgil
 */

//public class Layout {
//
//}

package def MODE_INIT = 1;
package def MODE_RUNNING = 2;

package var mode = MODE_INIT;

// system var
package def SCR_X = primary.visualBounds.width;
package def SCR_Y = primary.visualBounds.height;

// common
package var offsetX: Number;
package var offsetY: Number;
package var acc: Number;
package var brk1_range: Number;
package var brk1_ratio: Number;
package var brk2_range: Number;
package var brk2_ratio: Number;
package var stop_range: Number;
//package var radius: Number = 50;

def const_adj = 8;

// OB - Outter box
package var obOffsetX: Number = 90;
package var obOffsetY: Number = 90;
package var obX: Number;
package var obY: Number;
package var obW: Number;
package var obH: Number;
package var obArcW: Number;
package var obArcH: Number;
package var obOutColor: Color;
package var obInColor: Color;

// IC - Innere Cube
package var icOffsetX: Number = bind obOffsetX + const_adj;
package var icOffsetY: Number = bind obOffsetY + const_adj;
package var icX: Number;
package var icY: Number;
package var icW: Number;
package var icH: Number;

package var textColor;


public function switchLayout( newMode ){
    if( newMode == MODE_INIT ){
        offsetX = 50;   offsetY = 50;
        obOffsetX = 90;   obOffsetY = 90;
        obX = 0;        obY = 0;
        obW = 220;      obH = 220;
        obArcW = 10;    obArcH = 10;
        obOutColor = Color.GAINSBORO;
        obInColor = Color.LIMEGREEN;

        icW = ( obH - 2*const_adj ) / 2;
        icH = icW;

        textColor = Color.BLANCHEDALMOND;

        acc = 0.15;

        brk1_range = 10.0;
        brk1_ratio = 0.8;
        brk2_range = 0.5;
        brk2_ratio = 0.15;
        stop_range = 0.1;


    }else if( newMode == MODE_RUNNING ){
        offsetX = 50;   offsetY = 50;
        obOffsetX = 90;   obOffsetY = 90;
        //obX = 0;    obY = 0;
        obW = 816;  obH = 616;
        obArcW = 10;    obArcH = 10;

        obOutColor = Color.GAINSBORO;
        obInColor = Color.ORANGE;

        icW = ( obH - 2*const_adj ) / 2;
        icH = 400;

        textColor = Color.AZURE;

        acc = 0.1;

        brk1_range = 10.0;
        brk1_ratio = 0.65;
        brk2_range = 0.4;
        brk2_ratio = 0.1;
        stop_range = 0.065;

    }
}



